********************************************************************************************************************
*****Do-file for Table 1
*****Who is mobilized to vote by short text messages? Evidence from a nationwide field experiment with young voters
********************************************************************************************************************
*****Last edited 24/6/5
********************************************************************************************************************
*****Ado packages needed: estout
********************************************************************************************************************


*Use data
use \data\dataforanalysis230522_v2.dta, clear

*************************************************
*****TABLE 1
*************************************************

replace age=age+3 //replace age for age in 2022

rename svatva_k income
eststo s1: estpost tabstat female age mohighschool income foreign if treated!=.,statistics(mean sd) columns(statistics)
keep if age>18 & age<30


eststo s2: estpost tabstat female age mohighschool income foreign if treated!=.,statistics(mean sd) columns(statistics)
eststo s3: estpost tabstat female age mohighschool income foreign if shrereg!=., statistics(mean sd) columns(statistics)
eststo s4: estpost tabstat female age mohighschool income foreign, statistics(mean sd) columns(statistics)


esttab, cells(mean(fmt(2)) sd(fmt(2) par)) unstack nonote nonumber noobs stats(N, fmt(a) labels("Observations")) mtitles("Sample" "Sample Municipalities" "All Voters") replace




